import { Req, type Resp } from '@/utils/request'

// 获取接口日志
export function getBannerList(page: {
  pageNum: number
  pageSize: number
}): Promise<Resp<PageInfo<Banner>>> {
  return Req.$get<PageInfo<Banner>>('/assets/bannerList', page)
}

// banner 状态修改
export function updateBannerStatus(id: number, isShow: string): Promise<Resp<any>> {
  return Req.$put<any>('/assets/bannerUpdate', {}, { id, isShow })
}

// banner 删除
export function deleteBanner(id: number): Promise<Resp<any>> {
  return Req.$delete<any>('/assets/bannerDelete', {}, { id })
}
